<template>
  <div>
    asdsdad
  </div>
</template>

<script>
import axios from 'axios'

export default {
  name: 'Axios2',
  comments: {

  },
  create() {
    /* 两种get方法*/
    // http://localhost:8080/data.json
    axios.get('data.json', {
      parms: {
        id: 11,
        name: 'luotao'
      }
    }).then((res) => {
      console.log(res)
    })
    axios({
      method: 'get',
      url: 'data.json',
      parms: {
        id: 11,
        name: 'luotao'
      }
    }).then(res => {
      console.log(res)
    })
  }
}
</script>

<style scoped>

</style>
